#!/bin/sh

WAZE_TARGET_DIR=/home/user/MyDocs/.waze

if [ -e "${WAZE_TARGET_DIR}" -a -e "${WAZE_TARGET_DIR}/user" ]; then
    echo Removing previous Waze data from ${WAZE_TARGET_DIR}
    rm -Rf ${WAZE_TARGET_DIR}
fi

if [ "`grep waze /etc/pulse/xpolicy.conf`" = "" ]; then
    cat /opt/waze/bin/waze_xpolicy.conf >> /etc/pulse/xpolicy.conf
fi

